<form action="<?= base_url()?>utama/save_pegawai" method="post">
	<div id="main_content" style="min-height: 500px">
		<div class="grid_6" style="margin-right: 50%">
			<div class="box">
				<div class="header">
					<h3>
						Tambah Pegawai
					</h3>
				</div>
				<div class="content no-padding with-actions">
					<div class="section _100">
						<label for="nama_pegawai">
							Nama Pegawai
						</label>
						<div>
							<input maxlength="45" class="required" name="nama_pegawai" id="nama_pegawai"/>
						</div>
					</div>
					<div class="section _100">
						<label for="tempat_tanggal_lahir">
							Tanggal Lahir
						</label>
						<div>
							<input type="text" class="required dateISO" name="tanggal_lahir" id="tanggal_lahir"/>
						</div>
					</div>
					<div class="section _100">
						<label for="no_telpon">
							Nomor Telepon
						</label>
						<div>
							<input maxlength="20" type="text" class="required " name="no_telpon" id="no_telpon"/>
						</div>
					</div>
					<div class="section _100">
						<label for="alamat">
							Alamat
						</label>
						<div>
							<input maxlength="100" type="text" class="required" name="alamat" id="alamat"/>
						</div>
					</div>
					<div class="section _100">
						<label for="email">
							Email
						</label>
						<div>
							<input maxlength="100" type="text" class="required email" name="email" id="email"/>
						</div>
					</div>
					<div class="section _100">
						<label for="username">
							Username
						</label>
						<div>
							<input maxlength="45" type="text" class="required" name="username" id="username"/>
						</div>
					</div>
					<div class="section _100">
						<label for="password">
							Password
						</label>
						<div>
							<input maxlength="45" type="password" class="required" name="password" id="password"/>
						</div>
					</div>
					<div class="section _100">
						<label>
							Jabatan
						</label>
						<div>
							<select name="jabatan" class="required">
								<option value="">
								</option>
								<option value="direktur_utama">
									Direktur Utama
								</option>
								<option value="sekretaris">
									Sekretaris
								</option>
								<option value="direktur_teknik">
									Direktur Teknik
								</option>
								<option value="admin">
									Admin
								</option>
								<option value="divisi_interior">
									Divisi Interior
								</option>
								<option value="divisi_estetika">
									Divisi Estetika
								</option>
								<option value="divisi_arsitektur">
									Divisi Arsitektur
								</option>
								<option value="kepala_studio">
									Kepala Studio
								</option>
								<option value="drafter_operator">
									Drafter / Operator
								</option>
							</select>
						</div>
					</div>
					<div class="actions">
						<div class="actions-right" style="padding: 10px">
							<input type="submit" style="float: right" value="Simpan"/>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</form>

<script type="text/javascript">
	$(function (){
		$("#tanggal_lahir").datepicker({ dateFormat: 'yy-mm-dd' });
	});
</script>
<script type="text/javascript">
	//<![CDATA[
    $(window).load(function () {
		var a = $("form").validate({
			invalidHandler: function (d, b) {
				var e = b.numberOfInvalids();
				if (e) {
					var c = e == 1 ? "Anda hanya mengisi 1 field, field kosong telah ditandai" : "Anda tidak mengisi " + e + " fields. Field tersebut telah ditandai.";
					$(".box .content").removeAlertBoxes();
					$(".box .content").alertBox(c, {
						type: "warning",
						icon: true,
						noMargin: false
					});
					$(".box .content .alert").css({
						width: "",
						margin: "0",
						borderLeft: "none",
						borderRight: "none",
						borderRadius: 0
					})
				} else {
					$(".box .content").removeAlertBoxes()
				}
			},
			showErrors: function (c, d) {
				this.defaultShowErrors();
				var b = this;
				$.each(d, function () {
					var f = $(this.element);
					var e = f.parent().find("label.error").hide();
					e.addClass("red");
					e.css("width", "");
					f.trigger("labeled");
					e.fadeIn()
				})
			},
			submitHandler: function (b) {
				$("form").submit();
			}
		})
	});
    //]]>
</script>